import requests

url = "https://testpassport.rabbitpre.com/api/sso/login"
params = {"account":"****","password":"****","fromType":"pc"}
session = requests.session()
response = session.post(url, json=params)
if response.json().get("errorCode") == "SUCCESS":
    print("登录成功!")
else:
    print("登录失败:", response.text)



user_url = "https://bws.test.rabbitpre.com/api/user"
user_info = session.get(user_url, verify=False)


orgid_url = "https://home.test.rabbitpre.com/api/workbench/org/getCompanyInfo"
orgid_info = session.get(orgid_url, verify=False)

user_id = user_info.json()["data"]["userId"]
org_id = orgid_info.json()["data"]["org_id"]

print(user_id)
print(org_id )